var
	c:char;
	n:integer=0;
begin
	
	while not eoln() do
	begin
		read(c);	
		if(ord(c)<>ord(' '))then
		begin
			write(c);
			inc(n);
		end;
	end;
	writeln;
	writeln(n);
end.
